﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 人员信息基础输入参数
    /// </summary>
    public class EmployeeBaseInput
    {
        /// <summary>
        /// 项目
        /// </summary>
        public virtual long ProjectId { get; set; }
        
        /// <summary>
        /// 住建ID
        /// </summary>
        public virtual string? ZjEmpID { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        public virtual string Name { get; set; }
        
        /// <summary>
        /// 身份证号
        /// </summary>
        public virtual string? IdNum { get; set; }
        
        /// <summary>
        /// 年龄
        /// </summary>
        public virtual int Age { get; set; }
        
        /// <summary>
        /// 性别
        /// </summary>
        public virtual GenderEnum Sex { get; set; }
        
        /// <summary>
        /// 民族
        /// </summary>
        public virtual string? Nation { get; set; }
        
        /// <summary>
        /// 生日
        /// </summary>
        public virtual string? Birthday { get; set; }
        
        /// <summary>
        /// 住址
        /// </summary>
        public virtual string? Address { get; set; }
        
        /// <summary>
        /// 户籍
        /// </summary>
        public virtual string? Native { get; set; }
        
        /// <summary>
        /// 电话
        /// </summary>
        public virtual string? Phone { get; set; }
        
        /// <summary>
        /// 注册人脸
        /// </summary>
        public virtual string? Facephoto { get; set; }
        
        /// <summary>
        /// 工种
        /// </summary>
        public virtual string? WorkType { get; set; }
        
        /// <summary>
        /// 工作组
        /// </summary>
        public virtual string? WorkGroup { get; set; }
        
        /// <summary>
        /// 紧急联系人
        /// </summary>
        public virtual string? EmerPeople { get; set; }
        
        /// <summary>
        /// 紧急联系人电话
        /// </summary>
        public virtual string? EmerPhone { get; set; }
        
        /// <summary>
        /// 文化程度
        /// </summary>
        public virtual string? Culture { get; set; }
        
        /// <summary>
        /// 健康状况
        /// </summary>
        public virtual string? Health { get; set; }
        
        /// <summary>
        /// 签发机关（长度20个字符）
        /// </summary>
        public virtual string? QianFaJiGuan { get; set; }
        
        /// <summary>
        /// 身份证正面照
        /// </summary>
        public virtual string? IDcard_A { get; set; }
        
        /// <summary>
        /// 身份证反面照
        /// </summary>
        public virtual string? IDcard_B { get; set; }
        
        /// <summary>
        /// 身份证起始日期
        /// </summary>
        public virtual string? QiXianQiShi { get; set; }
        
        /// <summary>
        /// 身份证失效日期
        /// </summary>
        public virtual string? QiXianShiXiao { get; set; }
        
        /// <summary>
        /// 银行名称
        /// </summary>
        public virtual string? BankName { get; set; }
        
        /// <summary>
        /// 银行账号
        /// </summary>
        public virtual string? BankAccount { get; set; }
        
        /// <summary>
        /// 是否自动审核
        /// </summary>
        public virtual bool IsAutoAudit { get; set; }
        
        /// <summary>
        /// 是否允许移动打卡
        /// </summary>
        public virtual bool IsMobile { get; set; }
        
        /// <summary>
        /// 移动端登录账号
        /// </summary>
        public virtual string? MobileAccount { get; set; }
        
        /// <summary>
        /// 移动端登录密码
        /// </summary>
        public virtual string? MobilePassword { get; set; }
        
        /// <summary>
        /// 注册人脸长度
        /// </summary>
        public virtual int PicLen { get; set; }
        
        /// <summary>
        /// 租户Id
        /// </summary>
        public virtual long? TenantId { get; set; }
        
        /// <summary>
        /// 创建者部门Id
        /// </summary>
        public virtual long? CreateOrgId { get; set; }
        
        /// <summary>
        /// 创建者部门名称
        /// </summary>
        public virtual string? CreateOrgName { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }

        /// <summary>
        /// 是否同步到设备
        /// </summary>
        public bool IsSendClient { get; set; }

        /// <summary>
        /// 同步人员到设备错误信息
        /// </summary>
        public string SendClientErr { get; set; }

    }

    /// <summary>
    /// 人员信息分页查询输入参数
    /// </summary>
    public class EmployeeInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 项目
        /// </summary>
        public long? ProjectId { get; set; }
        
        /// <summary>
        /// 住建ID
        /// </summary>
        public string? ZjEmpID { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 身份证号
        /// </summary>
        public string? IdNum { get; set; }
        
        /// <summary>
        /// 电话
        /// </summary>
        public string? Phone { get; set; }
        
    }

    /// <summary>
    /// 人员信息增加输入参数
    /// </summary>
    public class AddEmployeeInput : EmployeeBaseInput
    {
        /// <summary>
        /// 项目
        /// </summary>
        [Required(ErrorMessage = "项目不能为空")]
        public override long ProjectId { get; set; }
        
        /// <summary>
        /// 姓名
        /// </summary>
        [Required(ErrorMessage = "姓名不能为空")]
        public override string Name { get; set; }
        
        /// <summary>
        /// 年龄
        /// </summary>
        [Required(ErrorMessage = "年龄不能为空")]
        public override int Age { get; set; }
        
        /// <summary>
        /// 性别
        /// </summary>
        [Required(ErrorMessage = "性别不能为空")]
        public override GenderEnum Sex { get; set; }
        
        /// <summary>
        /// 是否自动审核
        /// </summary>
        [Required(ErrorMessage = "是否自动审核不能为空")]
        public override bool IsAutoAudit { get; set; }
        
        /// <summary>
        /// 是否允许移动打卡
        /// </summary>
        [Required(ErrorMessage = "是否允许移动打卡不能为空")]
        public override bool IsMobile { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 人员信息删除输入参数
    /// </summary>
    public class DeleteEmployeeInput : BaseIdInput
    {
    }

    /// <summary>
    /// 人员信息更新输入参数
    /// </summary>
    public class UpdateEmployeeInput : EmployeeBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 人员信息主键查询输入参数
    /// </summary>
    public class QueryByIdEmployeeInput : DeleteEmployeeInput
    {

    }
